package com.xc.hotelmgr.order.modules.order.dao;

import com.xc.hotelmgr.order.modules.order.entity.DtOrderChannelsEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 采购渠道
 * 
 * @author kemmy
 * @email kemmy@gmail.com
 * @date 2020-12-03 11:41:02
 */
@Mapper
public interface DtOrderChannelsDao extends BaseMapper<DtOrderChannelsEntity> {

    DtOrderChannelsEntity sqlSelectKey(int chanel, String userName);

    void refreshToken(@Param("aid") String aid, @Param("accessToken") String accessToken,  @Param("refreshToken") String refreshToken,  @Param("expiresIn") Integer expiresIn);

    Integer sqlSelectCntByChanel(Integer channel);

    List<DtOrderChannelsEntity> sqlSelectByChanel(Integer channel);

    Integer sqlIsAutoByHotelId(String hotelId);

    DtOrderChannelsEntity sqlSelectByOrderId(Integer channel, String orderId);

    DtOrderChannelsEntity getByStoreIdAndChannel(Integer storeId, Integer chanel);
}
